Public Class adm_findproduct
    Inherits System.Web.UI.Page
    'Protected WithEvents TheHeader1 As adm_header
    Public aUserSession(13) As String
    Protected WithEvents vid As System.Web.UI.WebControls.TextBox
    Protected WithEvents Company As System.Web.UI.WebControls.TextBox
    Protected WithEvents Display As System.Web.UI.WebControls.DropDownList
    Protected WithEvents RPP As System.Web.UI.WebControls.DropDownList
    Protected WithEvents btnFind As System.Web.UI.WebControls.Button
    Protected WithEvents btnCancel As System.Web.UI.WebControls.Button
    Public imgpath, currtURL As String
    Public objvalid As New gaValidation
    Public sortby As String
    Public Msg As String
    Public PG As String
    Public sQS As String
    Public vRs As DataSet
    Public nNumPages As String
    Public FilteredPG As String
    Public HTMLString As String
#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        objValid.getURL(Request.Url.ToString, imgpath, currtURL)
        DrawPaginationControls()
    End Sub
    Public Function DrawPaginationControls() As String
        Dim strPageNum As String = ""
        'If 'Request("sortby").count > 0 Then
        'sQS = sQS & "&sortby=" & Request("sortby")
        'End If
        strPageNum = "<table class=""pos""><tr>"

        If FilteredPG > 1 Then
            strPageNum += "<td align=""left""><font face=""arial"" size=""2"">"
            strPageNum += "	<a href=""adm_findusers.asp<%=sQS%>&action=Refind&PG=<%=FilteredPG - 1%>""><b>PREVIOUS PAGE</b></a></font></td>"

        End If
        strPageNum += "<td><font face=""arial"" size=2>&nbsp;</font></td><td>"

        strPageNum += "<font face=""arial"" size=2>Displaying Page <%=FilteredPG%> of <%=nNumPages%>.</font></td><td><font face=""arial"" size=2>&nbsp;</font></td>"

        If nNumPages > FilteredPG Then
            strPageNum += "<td align=""right"">"
            strPageNum += "	<font face=""arial"" size=""2""><a href=""adm_findusers.asp<%=sQS%>&action=Refind&PG=<%=FilteredPG + 1%>""><b>NEXT PAGE</b></a></font></td>"


        End If
        strPageNum += "</tr></table>"
        DrawPaginationControls = strPageNum
        'Return HTMLDispage
        '        <%	sub drawPaginationControls %>
        '		<table class="pos">
        '		<tr>
        '	 <%		if FilteredPG > 1 then %>
        '		<td align="left">
        '			<font face="arial" size=2><a href="adm_findusers.asp<%=sQS%>&action=Refind&PG=<%=FilteredPG - 1%>"><b>PREVIOUS PAGE</b></a>
        '			</font>
        '		</td>
        ' <%		end if %>
        '		<td>
        '			<font face="arial" size=2>&nbsp;
        '			</font>
        '		</td><td>
        '			<font face="arial" size=2>Displaying Page <%=FilteredPG%> of <%=nNumPages%>.
        '			</font>
        '		</td><td>
        '			<font face="arial" size=2>&nbsp;
        '			</font>
        '		</td>
        '   <%	if nNumPages > FilteredPg then %>
        '		<td align="right">
        '			<font face="arial" size=2><a href="adm_findusers.asp<%=sQS%>&action=Refind&PG=<%=FilteredPG + 1%>"><b>NEXT PAGE</b></a>
        '			</font>
        '		</td>
        '  <%	end if %>
        '		</tr>
        '		</table>
        '<%	end sub %>
    End Function


End Class
